//server.cc

#include"Shm.hpp"
#include"namedPipe.hpp"
int main()
{
    //创建共享内存
    Shm shm(gpathname,gproj_id,gCreater);
    char *shmaddr=(char*)shm.Addr();
    //创建管道
    NamePiped fifo(comm_path,Creater);
    fifo.OpenForRead();
    while(true)
    {
        std::string temp;
        fifo.ReadNamedPipe(&temp);
        std::cout<<"shm memory content: "<<shmaddr<<std::endl;
        sleep(1);
    }

    return 0;
}